Document Structure

HTML structural elements provide no change of appearance to your document, but provide important information to the remote browser about your document, such as the type of document being transmitted, its title, whether it is an index to other documents, etc. In an environment where HTML is potentially only one document type of many (with even SGML browsers available), it is recommended that you use structural elements to identify your HTML documents.

The HTML specification does not require documents to use all HTML structural elements (in fact, the only required element is <TITLE>), but following closer to form makes for more compliance with HTML and SGML client browsers. Also, browsers are now becoming available that can download only the document header to allow a client to determine if they want the rest of the document.

The Structure submenu (under the HyperText menu) includes the structural commands, as well as the commands found on the Header, Body and Footer popUp menus. You can add all the structural elements to a document at once by choosing the All Structural Tags command.

HTML Structural Elements

SGML Prologue
The first (and optional) element of an HTML document is the HTML Formal Public Identifier (FPI), which is a declaration of the language used in the document. This is in the form of an SGML prologue, or "document type" element. The parameters point to a description of the HTML language in a DTD (Document Type Description) format. Note that the <!DOCTYPE> element has no ending "</" tag:

   <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

Lacking an SGML prologue, the HTTP server assigns to documents with the filename extension ".html" the default MIME type "text/html".

HTML Tags
The beginning and end of an HTML document is marked with the HTML language tags <HTML> and </HTML>. If an SGML Prologue is used (see above), the initial <HTML> tag follows the prologue.

Header Tags
An HTML document header is delimited with the tags <HEAD> and </HEAD>. The document header contains information used by a browser program to navigate and keep track of document history, and shouldn't  contain any document content, other than the document title and optional HTML comments.

Title Tags
All HTML documents should have a document title, enclosed by <TITLE> and </TITLE> tags. The document title should be placed between the <HEAD> and </HEAD> tags.

Body Tags
The document body is delimited with the tags <BODY> and </BODY>. All document content should reside between these body tags. The document body follows the header section, with the closing </HTML> tag (if used) following the closing </BODY> tag.

Footer Separator
The optional <!--FOOT--> comment is used to separate the Body and Footer areas (used in HTML.edit only, see the next section below). This comment must be placed between the <BODY> and </BODY> tags.

HTML.edit Structure vs. HTML Document Structure
HTML.edit uses three text areas to compose a document: the Header area, Body area, and Footer area. These are concatenated (ie., added together sequentially) when the document is exported. HTML's <HEAD> and <BODY> sections correspond loosely to HTML.edit's insofar as function, and you may divide your document within the three HTML.edit text areas any way you wish so long as the concatenated document conforms to the HTML placement as described above and shown below. The Footer area is not necessary and only useful in creating a common footer for a set of documents.

Sample
A sample structure is shown below, complete with recommended divisions for Header, Body and Footer sections:

————— start of HTML.edit Header area —————
<!DOCTYPE>        [optional]
<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
</HEAD>
————— start of HTML.edit Body area —————
<BODY>

     [Your document content goes here…]

————— start of HTML.edit Footer area —————
<!--FOOT-->        [optional]
<ADDRESS>
     [The author's address information goes here]
</ADDRESS>
</BODY>
</HTML>
————— end of HTML.edit Footer area —————

Since HTML.edit concatenates the Header+Body+Footer text areas on exported text files using the Export command, you could conceivably put the entire contents of your file within any one of the text areas, and you would obtain the same exported document. The "All Structural Tags" command (found under the HTML menu on the palette) adds the HTML structure tags as shown above, and parses the text accordingly.

If you are trying to create a standard header "look", locate the beginning <BODY> tag after the </HEAD> tag in the Header area, and put your standard HTML code following it, but still within the Header area, as in:

————— start of HTML.edit Header area —————
<!DOCTYPE>        [optional]
<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
</HEAD>
<BODY>
     [Master Header text here...]
————— start of HTML.edit Body area —————

     [Your document content here…]
     [etc.]

For related information, check the HyperText menu's Structure submenu.

Back to Info Window, on to Header, or return to Contents.